{layout name="layout/layout" /}
<div class="register_head">
    <img id="back" src="__STATIC__/index/img/return.png">
    <p>积分管理</p>
    <img id="integral_img" src="__STATIC__/index/img/jifen.png">
</div>
<div class="main">
    <div class="integral_integral">
        <div class="integral_card">
            <span class="integral_huiyuan">{$user->vip_title}{if condition="$user->vip_title != '暂无等级'"}会员{/if}</span>
            <!--<img id="header" src="__STATIC__/index/img/head_bg.png" >-->
            <img id="header" src="{$wechat_user['headimgurl']}">
            <div class="integral_msg">
                <p>{$user->user_name}</p>
                <p>26项&nbsp;&nbsp;<img src="__STATIC__/index/img/more.png"></p>
            </div>
            <div class="integral_total">
                <big><?php echo substr($user['jifen'],0,strlen($user['jifen'])-3); ?></big>&nbsp;
                <small>积分</small>
            </div>
        </div>
    </div>
    <div class="integral_title">积分明细</div>
    <div>
        {if($intedral)}
        {foreach $intedral as $vo}
        <div class="integral_detail">
            <div class="integral_content">
                <p class="integral_address">{$vo.address}<br/>
                    <small id="date">{$vo.sysdate}</small>
                </p>
            </div>
            <div class="integral_result">
                &nbsp;{$vo.point}&nbsp;
            </div>
        </div>
        {/foreach}
        {/if}
    </div>
</div>
<script>
  // 取消提示的http地址显示
    window.alert = function(name) {
        var iframe = document.createElement("IFRAME");
        iframe.style.display = "none";
        iframe.setAttribute("src", 'data:text/plain,');
        document.documentElement.appendChild(iframe);
        window.frames[0].window.alert(name);
        iframe.parentNode.removeChild(iframe);
    }
    $(function () {

        $('#integral_img').click(function () {
            window.location.href = "{:Url('index/index/power',['viplevel'=>$user->vip_id])}";
        });
    })
</script>
<script>
    $(function () {
        $("#back").click(function () {
            window.history.go(-1);
        });
    })
</script>

